ath9k: Postpone key cache entry deletion for TXQ frames reference it
authorJouni Malinen <jouni@codeaurora.org>
Mon, 14 Dec 2020 17:21:18 +0000 (19:21 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 23 Sep 2021 20:35:21 +0000 (21:35 +0100)
commit4403085796bd1092f8af0bd80a78c68fee4bd4fe
tree4e74d799d8212e7f89e5a0adc9cead044a510eb2
parent8d4af87613e7d1b7b564ef366a927043a13217a3
ath9k: Postpone key cache entry deletion for TXQ frames reference it

Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit?id=e2036bc3fc7daa03c15fda27e1818192da817cea
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2020-3702

commit ca2848022c12789685d3fab3227df02b863f9696 upstream.

Do not delete a key cache entry that is still being referenced by
pending frames in TXQs. This avoids reuse of the key cache entry while a
frame might still be transmitted using it.

To avoid having to do any additional operations during the main TX path
operations, track pending key cache entries in a new bitmap and check
whether any pending entries can be deleted before every new key
add/remove operation. Also clear any remaining entries when stopping the
interface.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201214172118.18100-6-jouni@codeaurora.org
Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name ath9k-Postpone-key-cache-entry-deletion-for-TXQ-fram.patch
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/ath9k/main.c